This invention relates to a microprocessor including a checking circuit capable of testing in a short time a program stored in a semiconductor memory device to check whether the program must be debugged.
In order to efficiently utilize a computer it is essential to prepare suitable software, that is, a program. Even with the highly developed electronic technology presently in use today, it is difficult to automate the development of a program. Thus, it still it requires much time and labor to prepare a program.
The same is true for the development of software for use in a microcomputer fabricated with semiconductor integrated circuits. More particularly, since it requires much time for debugging a program, a long period is necessary for designing and manufacturing hardware, especially in the case of a microcomputer (including a microprocessor).
For efficiently debugging a program prepared for use in a microcomputer, after executing an instruction, it is necessary to read out and confirm the content of a register (including a memory device, flag, etc.) in a central processing unit (CPU). Moreover, in order to correctly execute the next instruction step, care should be taken not to change the internal state of the CPU such as a register, a program counter, an instruction register, etc., contained in the CPU during the checking.
Although there are many methods of checking a microcomputer program, according to a so-called single step method, the actual operation states of the hardware are sequentially checked at each step of an instruction. More particularly, according to this method, each time an instruction is executed, the operation of the CPU (i.e., microprocessor) is stopped and the contents of a memory device, an accumulator, various registers or the like contained in the CPU are displayed so as to check whether or not the contemplated program is operating correctly.
With this checking method, however, there is a defect in that the contents of only some of the registers can be confirmed external to the microprocessor. Although this difficulty can be overcome by providing exclusive input/output terminals connected to all of the registers in the microprocessor, this is not practical because of the limitations caused by the number of pins of a standardized package or the chip size.